from django.db import models


class Book(models.Model):
    name = models.CharField(max_length=64)
    content = models.CharField(max_length=255)
    count = models.IntegerField(default=0)
    c_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'book'


class BookPush(models.Model):
    book = models.ForeignKey('Book', models.DO_NOTHING, blank=True, null=True)
    p_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'book_push'


class BookPushLog(models.Model):
    book = models.ForeignKey('Book', models.DO_NOTHING, blank=True, null=True)
    p_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'book_push_log'
